<%@ Page Language="C#" MasterPageFile="~/LTR/MlyLtrMaster.Master" AutoEventWireup="true"
    CodeBehind="reportsParams.aspx.cs" Inherits="MLY.Reports.reportsParams" %>

<%@ Register Assembly="CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
    Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="titleHolder" runat="server">
    <script language="javascript" type="text/javascript">
//        function DemoReportClick() {
//            if (document.getElementById("ctl00_ContentPlaceHolder1_DemoStageHiddenField").value == "4.5") {
//                setTimeout('DemoReportRemoveHighLight()', 3000);
//            }
//        }
//        function DemoReportRemoveHighLight() {
//            document.getElementById("ctl00_ContentPlaceHolder1_DataFlowReportLink").className = 'floater regFont demostophighlight';
//            document.getElementById("ctl00_Menu21_AlertsLink").className = 'demohighlight';
//            document.getElementById("ctl00_DemoLabel").innerHTML = 'The next thing to see is the system alerts. Please visit the highlighted "Alerts" page ';
//        }

        function ShowDiv(divname) {
            document.getElementById(divname).style.display = 'inline';
        }
        function HideDiv(divname) {
            document.getElementById(divname).style.display = 'none';
        }
        
        window.onload = function() {
            $("#data_viewmenuitem").addClass('active');
        }
    </script>
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <%--<asp:HiddenField ID="DemoStageHiddenField" runat="server" Value="0" />--%>
    <div id="win-xp" style="width: 100%; font-size: 12px; color: #414042">
        <br /><br />
        <asp:Panel ID="NewReports" runat="server">
            <asp:HyperLink ID="WorkOrderByDatesReportLink" runat="server" Text="<%$ Dict:reportsParams.WorkOrdersByDatesReport %>"
            NavigateUrl="~/Reports/AdvReportsViewer.aspx?ReportName=OrdersByDates" CssClass="floater regFont"></asp:HyperLink>
            <div class="popupDiv democlass" id="WorkOrderByDatesReportLinkDiv">
                In the Orders By Dates report you can observe your orders according to 
                fillters regarding to dates. <br /> You can choose 4 different kinds of fillter dates in 
                the combo box and then decide what are the dates that relevant for you in the date picker  
            </div>
            <br /><br />
            <asp:HyperLink ID="InventoryReportLink" runat="server" Text="<%$ Dict:reportsParams.InventoryReport %>"
             CssClass="floater regFont" NavigateUrl="~/Reports/AdvReportsViewer.aspx?ReportName=OpenOrders"></asp:HyperLink>
            
            <div class="popupDiv democlass" id="InventoryReportLinkDiv">
                The open orders/inventory report is pretty simple, <br /> all you have to do is choose from the combo box the 
                organization that <br /> is relevant for you and then you can see all his open ordes/ inventory. 
            </div>
             <br /><br />
            <asp:HyperLink ID="OpenLateWorkOrdersReport" runat="server" Text="<%$ Dict:reportsParams.OpenLateWorkOrders %>"
             CssClass="floater regFont" NavigateUrl="~/Reports/AdvReportsViewer.aspx?ReportName=LateOrders"></asp:HyperLink>
            
            <div class="popupDiv democlass" id="OpenLateWorkOrdersReportDiv">
                The Late Orders report make it possible for you to eliminate <br /> 
                all your orders except  those how defined as late, <br /> 
                you can to choose to include open/close orders and you <br /> also can use the date filter.
            </div> 
            <br />   <br />          
            <asp:HyperLink ID="RelatedOrganizationsSummaryLink" runat="server" Text='<%$Dict:reportsParams.OrganizationSummaryReport %>'
             NavigateUrl="~/Reports/AdvReportsViewer.aspx?ReportName=RelatedOrganizationsSummary" CssClass="floater regFont"></asp:HyperLink> 
            
            <div class="popupDiv democlass" id="RelatedOrganizationsSummaryLinkDiv">
                The Related Organizations Summary report gives you a list of <br /> 
                potential organizations that you can be related to and <br /> can do business with. 
            </div> 
            <br /><br /> 
            <%--<asp:HyperLink ID="SystemErrorsReportLink" runat="server" Text='<%$Dict:reportsParams.ErrorsReport %>'
             NavigateUrl="~/Reports/DataReports/ErrorsLog.aspx" Target="_blank" CssClass="floater regFont"></asp:HyperLink>   
            
            <div class="popupDiv democlass" id="SystemErrorsReportLinkDiv">
                The System's Errors Report produce a list of error<br /> 
                messages, each one with the date and the time that<br />  this error occurred
            </div> 
            <br /><br /> --%>
            <asp:HyperLink ID="CanceledOrdersReportLink" runat="server" Text='<%$ Dict:reportsParams.CanceledWOReport %>'
             NavigateUrl="~/Reports/AdvReportsViewer.aspx?ReportName=CanceledWorkOrders" CssClass="floater regFont"></asp:HyperLink>  
            
            <div class="popupDiv democlass" id="CanceledOrdersReportLinkDiv">
                The Canceled Work Orders report gives <br /> 
                you the amount of orders that have been <br /> canceled in percentage 
            </div> 
            <%--<br /><br /> 
            <asp:HyperLink ID="DataFlowReportLink" runat="server" 
            Target="_blank" CssClass="floater regFont" Text="<%$Dict:DataFlowReport.Title %>"></asp:HyperLink>  
            
            <div class="popupDiv democlass" id="DataFlowReportLinkDiv">
                In the Step time deviation report you have 4 kinds of <br /> 
                dates, you can choose 2 kinds and see how much time passed <br /> 
                between those two dates. <br /> 
                You can also filter by organization and between two <br /> 
                specific dates with the date pickers.
            </div> --%>
            <br /><hr /><br />
        </asp:Panel>        
        <asp:Panel ID="SCCoverReports" runat="server">
            <asp:HyperLink ID="DeadInventoryReportLink" runat="server" Text="Dead inventory report" 
             CssClass="floater regFont" NavigateUrl="~/Reports/AdvReportsViewer.aspx?ReportName=DeadInventory"></asp:HyperLink>
             <br /><br />
             <asp:HyperLink ID="AlertReportLink" runat="server" Text="Open alerts report"
              CssClass="floater regFont" NavigateUrl="~/Reports/AdvReportsViewer.aspx?ReportName=OpenAlerts"></asp:HyperLink>
              <br /><br />
             <asp:HyperLink ID="MissingOrdersReportLink" runat="server" Text="Missing orders report"
              CssClass="floater regFont" NavigateUrl="~/Reports/AdvReportsViewer.aspx?ReportName=MissingOrders"></asp:HyperLink>
              <br /><br />
              <asp:HyperLink ID="LastOrderReport" runat="server" Text="Last order report" 
              CssClass="floater regFont" NavigateUrl="~/Reports/AdvReportsViewer.aspx?ReportName=LastOrder"></asp:HyperLink>
            <br /><hr /><br />
        </asp:Panel>
        <asp:Panel ID="OldReports" runat="server" Visible="false">
            <table cellpadding="3"  class="align" cellspacing="0" border="0" style="width: 100%; height:auto;">
            <tr style="vertical-align: middle; height: 40px;">
                <td style="width: 92px;">
                    <asp:Label ID="lblReports" Text='choose Report' runat="server"></asp:Label>
                </td>
                <td style="width: 208px;">
                    <asp:DropDownList ID="ddlReports" CssClass="filterDdl" runat="server" OnSelectedIndexChanged="ddlReports_SelectedIndexChanged"
                        AutoPostBack="True" OnPreRender="ddlReports_PreRender">
                        <asp:ListItem Selected="True" Value="0" Text='<%$Dict:reportsParams.chooseReport %>'></asp:ListItem>
                        <asp:ListItem Value="1" Text='<%$Dict:reportsParams.InventoryReport %>'></asp:ListItem>
                        <asp:ListItem Value="2" Text='<%$Dict:reportsParams.OpenLateWorkOrders %>'></asp:ListItem>
                        <asp:ListItem Value="3" Text='<%$Dict:reportsParams.OrganizationSummaryReport %>'></asp:ListItem>
                        <asp:ListItem Value="4" Text='<%$Dict:reportsParams.WorkOrdersByDatesReport %>'></asp:ListItem>
                        <asp:ListItem Value="5" Text='<%$Dict:reportsParams.ErrorsReport %>'></asp:ListItem>
                        <asp:ListItem Value="6" Text='<%$Dict:reportsParams.CanceledWOReport %>'></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td style="width: 152px;" >
                    <asp:Label ID="lblOrg" Text='<%$Dict:reportsParams.ChooseOrganization: %>' runat="server"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlOrgs" runat="server" CssClass="filterDdl" DataTextField="OrganizationName"
                        DataValueField="OrganizationId" OnLoad="ddlOrgs_Load" OnPreRender="ddlOrgs_PreRender">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr style="height: 40px;">
                <td colspan="3">
                  
                </td>
                <td style="padding-right: 70px;">
                    <asp:Button ID="btnSubmit" Text='Submit' runat="server" OnClick="btnSubmit_OnClick"
                        CssClass="smallBtn Btn" Style="margin-right: 5px;" />
                    <span style="width: 1px; border-right: dashed 1px #aeaeae;">&nbsp </span>
                    <asp:Button ID="btnClose" Style="margin-left: 15px;" CssClass="smallBtn Btn" Text='Close'
                        runat="server" OnClick="btnClose_OnClick" />
                </td>
            </tr>
       
            <tr style=" height:40px;" ID="lblBetween" Visible="false" runat="server">
                <td colspan="2">
                </td>
                <td>
                    <asp:Label runat="server"  Text='<%$Dict:reportsParams.Between %>'></asp:Label>
                </td>
                <td>
                    <KBMControls:KBMReadOnlyTxtBox CssClass="blueBorder"  runat="server"
                        ID="txtFromDate"></KBMControls:KBMReadOnlyTxtBox>
                    <KBMValidators:requiredValidator runat="server" ControlToValidate="txtFromDate" ErrorMessage='<%$Dict:reportsParams.MustChooseBetweenTime %>'>
                    </KBMValidators:requiredValidator>
                    <KBMControls:KbmCalendar TargetControlID="txtFromDate" runat="server" ID="KbmCalendar1">
                    </KBMControls:KbmCalendar>
                </td>
            </tr>
            <tr ID="lblBetween2" visible="false" runat="server" style=" height:40px;">
                <td colspan="2">
                </td>
                <td>
                    <asp:Label  runat="server"  Text='<%$Dict:reportsParams.And %>'></asp:Label><br />
                </td>
                <td>
                    <KBMControls:KBMReadOnlyTxtBox CssClass="blueBorder"  runat="server"
                        ID="txtToDate"></KBMControls:KBMReadOnlyTxtBox>
                    <KBMValidators:BiggerThenEqualDateValidator ID="BiggerThenEqualDateValidator1" Display="None"
                        errorMessage='<%$Dict:reportsParams.ToDateSmallerThenFromDate %>' ControlToCompare="txtFromDate"
                        ControlToValidate="txtToDate" runat="server"></KBMValidators:BiggerThenEqualDateValidator>
                    <KBMValidators:requiredValidator ControlToValidate="txtToDate" ErrorMessage='<%$Dict:reportsParams.MustChooseToDate %>'
                        runat="server"></KBMValidators:requiredValidator>
                    <KBMControls:KbmCalendar TargetControlID="txtToDate" runat="server" ID="Calendar1">
                    </KBMControls:KbmCalendar>
                </td>
            </tr>
                 <tr style=" height:40px;">
            <td colspan="3"></td>
           
            <td>
             
                    <asp:DropDownList runat="server" CssClass="filterDdl" ID="ddlLateOrderColumnDate"
                        Visible="false">
                        <asp:ListItem Text='RequestedDelivaryDate' Value="2"></asp:ListItem>
                        <asp:ListItem Selected="True" Text='PlannedDelivaryDate' Value="3"></asp:ListItem>
                    </asp:DropDownList>
             </td>
                  
            </tr>
            <tr style="height:40px;" runat="server" >
            <td colspan="3"></td>
           
              <td>
                    <asp:DropDownList CssClass="filterDdl" runat="server" ID="columnListDdl"  Visible="false">
                        <asp:ListItem Selected="True" Text="Choose Column" Value="0"></asp:ListItem>
                        <asp:ListItem Text='SendDate' Value="1"></asp:ListItem>
                        <asp:ListItem Text='RequestedDelivaryDate' Value="2"></asp:ListItem>
                        <asp:ListItem Text='PlannedDelivaryDate' Value="3"></asp:ListItem>
                        <asp:ListItem Text='ActualDelivaryDate' Value="4"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:RangeValidator runat="server" ID="columnListDdlValidator" ControlToValidate="columnListDdl"
                        MinimumValue="1" EnableClientScript="true" MaximumValue="1000" Type="Integer"
                        Display="None" ErrorMessage='<%$Dict:reportsParams.ColumnNotChosen%>' Visible="False">
                    </asp:RangeValidator>
            </td>
            </tr>
            <tr>
            <td colspan="2">
             <asp:Panel ID="panelErr" runat="server" Visible="false">
                        <asp:Label ID="lblErr" runat="server" ForeColor="Red" Text='<%$Dict:reportsParams.CannotShowThisReportForContractor!%>'
                            Visible="false"></asp:Label>
                    </asp:Panel>
            </td>
                <td colspan="2">
                    <asp:ValidationSummary ID="ValidationSummary1" BorderStyle="Solid" BorderWidth="1"
                        runat="server" DisplayMode="BulletList" EnableClientScript="true" ShowSummary="true"
                        HeaderText='<%$Dict:reportsParams.ValidationErrors %>' />
                </td>
            </tr>
        </table>
        </asp:Panel>
        
    </div>
</asp:Content>
